home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Contributed / SpriteWorld / SpriteWorld Files / Utils / SWFastLine.h < prev    next >
Encoding:
Text File  |  2000-10-06  |  3.8 KB  |  187 lines  |  [TEXT/CWIE]

  1. ///--------------------------------------------------------------------------------------
  2. //    SWFastLine.h
  3. ///--------------------------------------------------------------------------------------
  4.  
  5. #ifndef __TOOLUTILS__
  6. #include <ToolUtils.h>
  7. #endif
  8.  
  9. #ifndef __OSUTILS__
  10. #include <OSUtils.h>
  11. #endif
  12.  
  13. #ifndef __QUICKDRAW__
  14. #include <Quickdraw.h>
  15. #endif
  16.  
  17. #ifndef __QDOFFSCREEN__
  18. #include <QDOffscreen.h>
  19. #endif
  20.  
  21. #ifndef __SWCOMMON__
  22. #include <SWCommonHeaders.h>
  23. #endif
  24.  
  25. #ifndef __SPRITEWORLD__
  26. #include <SpriteWorld.h>
  27. #endif
  28.  
  29. #ifndef __SPRITEWORLDUTILS__
  30. #include <SpriteWorldUtils.h>
  31. #endif
  32.  
  33. #ifndef __SPRITEFRAME__
  34. #include <SpriteFrame.h>
  35. #endif
  36.  
  37. #ifndef __BLITPIXIEINTERFACE__
  38. #include <BlitPixieInterface.h>
  39. #endif
  40.  
  41. #ifndef __SPRITECOMPILER__
  42. #include <SpriteCompiler.h>
  43. #endif
  44.  
  45.  
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49.  
  50. ///--------------------------------------------------------------------------------------
  51. //    Definitions
  52. ///--------------------------------------------------------------------------------------
  53.  
  54. typedef SW_FUNC void (*BlitLineProcPtr)(FramePtr dstFrameP, 
  55.     Point srcPoint, Point dstPoint, Byte color);
  56.  
  57. typedef SW_FUNC void (*CopyLineProcPtr)(FramePtr srcFrameP, 
  58.     FramePtr dstFrameP, Point srcPoint, Point dstPoint);
  59.  
  60.  
  61. ///--------------------------------------------------------------------------------------
  62. //    Function prototypes
  63. ///--------------------------------------------------------------------------------------
  64.  
  65. SW_FUNC void SWDrawLine68kAsm(
  66.     FramePtr dstFrameP, 
  67.     Point srcPoint, 
  68.     Point dstPoint, 
  69.     Byte color);
  70.  
  71. SW_FUNC void SWDrawLine(
  72.     FramePtr dstFrameP, 
  73.     Point srcPoint, 
  74.     Point dstPoint, 
  75.     Byte color);
  76.  
  77. SW_FUNC void SWCopyLine(
  78.     FramePtr srcFrameP, 
  79.     FramePtr dstFrameP, 
  80.     Point srcPoint, 
  81.     Point dstPoint);
  82.  
  83. SW_FUNC void SWDrawFrameRect(
  84.     FramePtr dstFrameP, 
  85.     Rect *destRect, 
  86.     Byte color);
  87.  
  88. SW_FUNC void SWCopyFrameRect(
  89.     FramePtr srcFrameP, 
  90.     FramePtr dstFrameP, 
  91.     Rect *destRect);
  92.  
  93.  
  94. SW_FUNC void SWDrawLineInScrollingWorld(
  95.     SpriteWorldPtr spriteWorldP, 
  96.     FramePtr dstFrameP, 
  97.     Point srcPoint, 
  98.     Point dstPoint, 
  99.     Byte color);
  100.  
  101. SW_FUNC void SWCopyLineInScrollingWorld(
  102.     SpriteWorldPtr spriteWorldP, 
  103.     FramePtr srcFrameP, 
  104.     FramePtr dstFrameP, 
  105.     Point srcPoint, 
  106.     Point dstPoint,
  107.     Rect *clipRectP);
  108.  
  109. SW_FUNC void SWDrawFrameRectInScrollingWorld(
  110.     SpriteWorldPtr spriteWorldP, 
  111.     FramePtr dstFrameP, 
  112.     Rect *dstRectP, 
  113.     Byte color);
  114.  
  115. SW_FUNC void SWCopyFrameRectInScrollingWorld(
  116.     SpriteWorldPtr spriteWorldP, 
  117.     FramePtr srcFrameP, 
  118.     FramePtr dstFrameP, 
  119.     Rect *dstRectP,
  120.     Rect *clipRectP);
  121.  
  122. ///--------------------------------------------------------------------------------------
  123. //    Internal functions
  124. ///--------------------------------------------------------------------------------------
  125.  
  126. SW_FUNC Boolean SWClipLineWithRect(Point *srcPoint, Point *dstPoint, Rect *clipRect);
  127.  
  128. void BlitLine68kAsm(
  129.     Ptr baseAddr, 
  130.     unsigned long rowBytes, 
  131.     short x1,
  132.     short x2, 
  133.     short y1, 
  134.     short y2, 
  135.     unsigned char color);
  136.  
  137. SW_FUNC void BlitLine(
  138.     FramePtr dstFrameP, 
  139.     Point srcPoint, 
  140.     Point dstPoint, 
  141.     Byte color);
  142.  
  143. SW_FUNC void BPCopyLine(
  144.     FramePtr srcFrameP,
  145.     FramePtr dstFrameP, 
  146.     Point srcPoint, 
  147.     Point dstPoint);
  148.  
  149. SW_FUNC void BlitWrappingLine(
  150.     FramePtr dstFrameP, 
  151.     Point srcPoint, 
  152.     Point dstPoint, 
  153.     Byte color);
  154.     
  155. SW_FUNC void BPCopyWrappingLine(
  156.     FramePtr srcFrameP, 
  157.     FramePtr dstFrameP, 
  158.     Point srcPoint, 
  159.     Point dstPoint);
  160.  
  161. SW_FUNC void BlitStraightLine(
  162.     FramePtr dstFrameP, 
  163.     Point srcPoint, 
  164.     Point dstPoint, 
  165.     Byte color);
  166.  
  167. SW_FUNC void BPCopyStraightLine(
  168.     FramePtr srcFrameP, 
  169.     FramePtr dstFrameP, 
  170.     Point srcPoint, 
  171.     Point dstPoint);
  172.     
  173. SW_FUNC void BlitStraightWrappingLine(
  174.     FramePtr dstFrameP, 
  175.     Point srcPoint, 
  176.     Point dstPoint, 
  177.     Byte color);
  178.  
  179. SW_FUNC void BPCopyStraightWrappingLine(
  180.     FramePtr srcFrameP, 
  181.     FramePtr dstFrameP, 
  182.     Point srcPoint, 
  183.     Point dstPoint);
  184.  
  185. #ifdef __cplusplus
  186. }
  187. #endif